<template>
<div>
    <span v-for="item in AffairsData" :key="item.id" class="v1">
      <div class="refSev">
      <div class="textN">成员:{{item.username}}</div>
      <el-tooltip class="item" effect="dark" :content="item.username+item.remarks" placement="top-start">
  <div class="textN">备注:{{item.remarks}}</div>
    </el-tooltip>
    <a :href="item.affairs_file" >点击下载</a>
      </div>
    </span>

</div>
</template>

<script>
import { getAllAffair } from '@/api/affairs'
export default {
  props: {
    Refdata: {
      type: Object,
      required: true
    }
  },
  data () {
    return {
      AffairsData: ''
    }
  },
  methods: {
    fetchAffair () {
      getAllAffair(this.Refdata.affairs_id).then(response => {
        const { data } = response
        this.AffairsData = data
        console.log(this.AffairsData)
      })
    }
    // sad () {
    //   console.log(this.Refdata.affairs_id)
    // },

  },
  created () {
    // console.log(this.Refdata.affairs_id)
    this.fetchAffair()
  },
  components: {},
  mounted () {
  }
}
</script>

<style lang="less" scoped>
.v1{
  display: inline-block;
  margin: .533333rem;
}
.refSev{
  padding: 5px;
  text-align: center;

  width: 120px;
  // height:50px;
  background-color: rgb(205, 241, 217);
  border-radius: 5px;
   box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
}
.textN{
  font-weight: 520;
  font-size: 1rem;
  white-space:nowrap;
  overflow: hidden;
   text-overflow:ellipsis;
}
</style>
